package com.jikangjun.disk.recycle.repository;

import com.jikangjun.disk.mybatis.flexigrid.PagingEntity;
import com.jikangjun.disk.recycle.entity.RecycleFileEntity;
import com.jikangjun.disk.recycle.entity.SearchRecycleEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RecycleDao {
    int queryRecycleCount(@Param("entity") SearchRecycleEntity entity);

    List<RecycleFileEntity> queryRecycleFilesByPage(@Param("entity") SearchRecycleEntity entity,@Param("paging") PagingEntity paging);

    void recoverFile(RecycleFileEntity recycleFile);

    void batchRecoverFiles(@Param("list") List<RecycleFileEntity> recycleFiles);

    void emptyRecycleBin(@Param("userUuid") String userUuid);

    void batchDeleteByIds(@Param("ids") List<String> ids, @Param("userUuid") String userUuid);

    List<RecycleFileEntity> queryByIds(@Param("ids") List<String> ids, @Param("userUuid") String userUuid);

    void deleteById(@Param("fileId") String fileId, @Param("userUuid") String userUuid);

    RecycleFileEntity queryById(String fileId, String userUuid);
}